package com.leyou.search.service;

import com.leyou.search.dto.SearchParamDTO;
import com.leyou.search.pojo.Goods;
import com.leyou.starter.elastic.dto.PageInfo;
import reactor.core.publisher.Mono;

import java.util.List;
import java.util.Map;

public interface SearchService {
    //创建es索引库
    public void createIndexAndMapping();

    //数据加载到索引库
    public void loadData();

    Mono<PageInfo<Goods>> searchGoods(SearchParamDTO paramDTO);

    Mono<List<String>> getSuggestion(String key);

    void saveSpuById(Long spuId);

    void deleteByid(Long spuId);

    Mono<Map<String, List<?>>> getFilterList(SearchParamDTO paramDTO);
}
